package IC.lir.Instrunction;

public abstract class MoveFieldInstruction extends Instruction {
	
	private boolean _isRead;
	private FieldMemory _memory;
	private Data _expretion;
	
	protected MoveFieldInstruction(boolean isRead, FieldMemory mem, Data expretion)
	{
		_isRead = isRead;
		_memory = mem;
		_expretion = expretion;
	}
	
	public String toString()
	{
		return _isRead ? 
				String.format("MoveField %s,%s", _memory.toString(), _expretion.toString())
			:
				String.format("MoveField %s,%s", _expretion.toString(), _memory.toString());
	}
}
